package org.soar.views.uicomponent;

import java.io.Serializable;



public class UIComponentConfig implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	private boolean emptyParent = false;
	private String transition = null;
	private boolean cache = true;
	private Integer parentId = null;
	
	
	public boolean isEmptyParent() {
		return emptyParent;
	}
	public void setEmptyParent(boolean emptyParent) {
		this.emptyParent = emptyParent;
	}
	public String getTransition() {
		return transition;
	}
	public void setTransition(String transition) {
		this.transition = transition;
	}
	public boolean isCache() {
		return cache;
	}
	public void setCache(boolean cache) {
		this.cache = cache;
	}
	public Integer getParentId() {
		return parentId;
	}
	public void setParentId(Integer parentId) {
		this.parentId = parentId;
	}
	public void extend(UIComponentConfig config) {
		if(config != null){
			emptyParent = config.isEmptyParent();
			transition = config.getTransition();
			cache = config.isCache();
			if(config.getParentId() != null){
				parentId = config.getParentId();
			}
		}
	}
	
	
}